import { validateIdcard } from '@/utils/validate.js'
import { gettype } from '@/api'
export default {
  /*   人员管理  */

  //人员管理表单
  PersonManagement: [
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'personName',
          label: '姓名:',
          span: 11,
          placeholder: '请输入姓名',
          rules: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
        },
        {
          type: 'select',
          prop: 'personGender',
          label: '性别:',
          span: 11,
          placeholder: '请选择性别',
          options: [
            {
              value: 0,
              label: '男',
            },
            {
              value: 1,
              label: '女',
            },
          ],
          rules: [{ required: true, message: '请选择性别', trigger: 'change' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'idCard',
          label: '身份证号:',
          span: 11,
          placeholder: '请输入身份证号',
          rules: [{ validator: validateIdcard, trigger: 'blur' }],
        },
        {
          type: 'input',
          prop: 'personNumber',
          label: '联系方式:',
          span: 11,
          placeholder: '请输入联系方式',
          rules: [{ required: true, message: '请输入联系方式', trigger: 'blur' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'residence',
          label: '居住信息:',
          span: 11,
          placeholder: '请输入居住信息',
          rules: [{ required: true, message: '请输入居住信息', trigger: 'blur' }],
        },
        {
          type: 'select',
          prop: 'personType',
          label: '人员类型:',
          span: 11,
          placeholder: '请选择人员类型',
          options: [
            {
              value: '0',
              label: '男',
            },
            {
              value: '1',
              label: '女',
            },
          ],
          rules: [{ required: true, message: '请选择人员类型', trigger: 'change' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'affiliatedUnit',
          label: '所属单位:',
          span: 11,
          placeholder: '请输入所属单位',
          rules: [{ required: true, message: '请输入所属单位', trigger: 'blur' }],
        },
        {
          type: 'select',
          prop: 'affiliatedTeam',
          label: '所属队伍:',
          span: 11,
          placeholder: '请选择所属队伍',
          options: [],
          rules: [{ required: true, message: '请选择所属队伍', trigger: 'change' }],
        },
      ],
    },
  ],

  //人员管理表单数据
  PersonManagementdata: {
    personName: '',
    personGender: '',
    idCard: '',
    personNumber: '',
    residence: '',
    personType: '',
    affiliatedUnit: '',
    affiliatedTeam: '',
  },

  // 人员管理查询表单
  searchPersonManagement: [
    {
      type: 'input',
      value: 'personName',
      name: '姓名',
      placeholder: '请输入内容',
    },
    {
      type: 'input',
      value: 'idCard',
      name: '身份证号',
      placeholder: '请输入内容',
    },
    {
      type: 'select',
      value: 'personType',
      name: '人员类型',
      placeholder: '请选择',
     
      options: [       
      ],
    },
  ],

  // 人员管理查询表单数据
  searchPersonManagementform: {
    personName: '',
    idCard: '',
    personType: '',
  },

  /* 队伍管理  */

  //队伍管理表单
  TeamManagement: [
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'teamName',
          label: '队伍名称:',
          span: 11,
          placeholder: '请输入队伍名称',
          rules: [{ required: true, message: '请输入队伍名称', trigger: 'blur' }],
        },
        {
          type: 'select',
          prop: 'teamType',
          label: '队伍类型:',
          span: 11,
          placeholder: '请选择队伍类型',
          options: [],
          rules: [{ required: true, message: '请选择队伍类型', trigger: 'change' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'date',
          prop: 'establishmentDate',
          label: '成立日期:',
          span: 11,
          placeholder: '请输入成立日期',
          format: 'YYYY-MM-DD',
          valueFormat: 'YYYY-MM-DD',
          rules: [{ required: true, message: '请输入成立日期', trigger: 'blur' }],
        },
        {
          type: 'input',
          prop: 'responsiblePerson',
          label: '负责人:',
          span: 11,
          placeholder: '请输入负责人',
          rules: [{ required: true, message: '请输入负责人', trigger: 'blur' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'personContact',
          label: '负责人联系方式:',
          span: 11,
          placeholder: '请输入负责人联系方式',
          rules: [{ required: true, message: '请输入负责人联系方式', trigger: 'blur' }],
        },
        {
          type: 'select',
          prop: 'affiliatedGroupp',
          label: '所属组室:',
          span: 11,
          placeholder: '请选择所属组室',
          options: [],
          rules: [{ required: true, message: '请选择所属组室', trigger: 'change' }],
        },
      ],
    },
  ],
  // 队伍管理表单数据
  TeamManagementdata: {
    teamName: '',
    teamType: '',
    establishmentDate: '',
    responsiblePerson: '',
    personContact: '',
    affiliatedGroupp: '',
  },
  // 队伍管理查询表单
  searchTeamManagement: [
    {
      type: 'input',
      value: 'teamName',
      name: '队伍名称',
      placeholder: '请输入内容',
    },

    {
      type: 'select',
      value: 'teamType',
      name: '队伍类型',
      placeholder: '请选择队伍类型',
      options: [],
    },
    {
      type: 'select',
      value: 'affiliatedGroupp',
      name: '所属组室',
      placeholder: '请选择所属组室',
      options: [],
    },
    {
      type: 'times',
      value: 'playTime',
      name: '成立时间',
      placeholder: '请选择时间',
    },
  ],
  // 队伍管理查询表单数据
  searchTeamManagementform: {
    teamName: '',
    teamType: '',
    affiliatedGroupp: '',
    // beginTime: '',
    // endTime: '',
    playTime: [],
  },

  /* 物资管理*/

  //物资管理表单
  MaterialManagement: [
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'materialName',
          label: '物资名称:',
          span: 11,
          placeholder: '请输入物资名称',
          rules: [{ required: true, message: '请输入物资名称', trigger: 'blur' }],
        },
        {
          type: 'select',
          prop: 'materialType',
          label: '物资类型:',
          span: 11,
          placeholder: '请选择物资类型',
          options: [
            {
              value: '0',
              label: '男',
            },
            {
              value: '1',
              label: '女',
            },
          ],
          rules: [{ required: true, message: '请选择物资类型', trigger: 'change' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'select',
          prop: 'unit',
          label: '所属机构:',
          span: 11,
          placeholder: '请选择所属机构',
          options: [
            {
              value: '0',
              label: '男',
            },
            {
              value: '1',
              label: '女',
            },
          ],
          rules: [{ required: true, message: '请选择所属机构', trigger: 'change' }],
        },
        {
          type: 'input',
          prop: 'currentStock',
          label: '当前库存:',
          span: 11,
          placeholder: '请输入当前库存',
          rules: [{ required: true, message: '请输入当前库存', trigger: 'blur' }],
        },
      ],
    },
  ],
  //物资管理表单数据
  MaterialManagementdata: {
    materialName: '',
    materialType: '',
    unit: '',
    currentStock: '',
  },
  // 物资管理查询表单
  searchMaterialManagement: [
    {
      type: 'input',
      value: 'materialName',
      name: '物资名称',
      placeholder: '请输入内容',
    },
    {
      type: 'select',
      value: 'materialType',
      name: '物资类型',
      placeholder: '请选择物资类型',
      options: [
        {
          value: '0',
          label: '男',
        },
        {
          value: '1',
          label: '女',
        },
      ],
    },
    {
      type: 'select',
      value: 'unit',
      name: '所属机构',
      placeholder: '请选择所属机构',
      options: [],
    },
  ],
  //物资管理查询表单数据
  searchMaterialManagementform: {
    materialName: '',
    materialType: '',
    unit: '',
  },

  /*   机构管理  */

  // 机构管理表单
  InstitutionManagement: [
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'institutionName',
          label: '机构名称:',
          span: 11,
          placeholder: '请输入机构名称',
          rules: [{ required: true, message: '请输入机构名称', trigger: 'blur' }],
        },
        {
          type: 'input',
          prop: 'geographicalLocation',
          label: '地理位置:',
          span: 11,
          placeholder: '请输入地理位置',
          rules: [{ required: true, message: '请输入地理位置', trigger: 'blur' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'personInCharge',
          label: '主要负责人:',
          span: 11,
          placeholder: '请输入主要负责人',
          rules: [{ required: true, message: '请输入主要负责人', trigger: 'blur' }],
        },
        {
          type: 'input',
          prop: 'contactMethod',
          label: '联系方式:',
          span: 11,
          placeholder: '请输入联系方式',
          rules: [{ required: true, message: '请输入联系方式', trigger: 'blur' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'longitude',
          label: '经度:',
          span: 11,
          placeholder: '请输入经度',
          rules: [{ required: true, message: '请输入经度', trigger: 'blur' }],
        },
        {
          type: 'input',
          prop: 'latitude',
          label: '纬度:',
          span: 11,
          placeholder: '请输入纬度',
          rules: [{ required: true, message: '请输入纬度', trigger: 'blur' }],
        },
      ],
    },
  ],
  // 机构管理表单数据
  InstitutionManagementdata: {
    institutionName: '',
    geographicalLocation: '',
    personInCharge: '',
    contactMethod: '',
    longitude: '',
    latitude: '',
  },
  //机构管理查询表单
  searchInstitutionManagement: [
    {
      type: 'input',
      value: 'institutionCode',
      name: '机构代码',
      placeholder: '请输入内容',
    },
    {
      type: 'input',
      value: 'institutionName',
      name: '机构名称',
      placeholder: '请输入内容',
    },
  ],
  //机构管理查询表单数据
  searchInstitutionManagementform: {
    institutionCode: '',
    institutionName: '',
  },

  /*    设备管理  */

  // 设备管理表单
  EquipmentManagement: [
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'deviceName',
          label: '设备名称:',
          span: 11,
          placeholder: '请输入设备名称',
          rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }],
        },
        {
          type: 'input',
          prop: 'deviceType',
          label: '设备类型:',
          span: 11,
          placeholder: '请输入设备类型',
          rules: [{ required: true, message: '请输入设备类型', trigger: 'change' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'geographicLocation',
          label: '设备位置:',
          span: 11,
          placeholder: '请输入设备位置',
          rules: [{ required: true, message: '请输入设备位置', trigger: 'blur' }],
        },
        {
          type: 'input',
          prop: 'responsiblePerson',
          label: '负责人:',
          span: 11,
          placeholder: '请输入负责人',
          rules: [{ required: true, message: '请输入负责人', trigger: 'blur' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'longitude',
          label: '经度:',
          span: 11,
          placeholder: '请输入经度',
          rules: [{ required: true, message: '请输入经度', trigger: 'blur' }],
        },
        {
          type: 'input',
          prop: 'latitude',
          label: '纬度:',
          span: 11,
          placeholder: '请输入纬度',
          rules: [{ required: true, message: '请输入纬度', trigger: 'blur' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'select',
          prop: 'deviceStatus',
          label: '设备状态:',
          span: 11,
          placeholder: '请选择设备状态',
          options: [
            {
              value: '正常运行',
              label: '正常运行',
            },
            {
              value: '停机',
              label: '停机',
            },
          ],
          rules: [{ required: true, message: '请选择设备状态', trigger: 'change' }],
        },
      ],
    },
  ],
  //设备管理表单数据
  EquipmentManagementdata: {
    deviceName: '',
    deviceType: '',
    geographicLocation: '',
    responsiblePerson: '',
    longitude: '',
    latitude: '',
    deviceStatus: '',
  },
  //设备管理查询表单
  searchEquipmentManagement: [
    {
      type: 'input',
      value: 'deviceName',
      name: '设备名称',
      placeholder: '请输入内容',
    },
    {
      type: 'input',
      value: 'deviceType',
      name: '设备类型',
      placeholder: '请输入内容',
    },
    {
      type: 'select',
      value: 'deviceStatus',
      name: '设备状态',
      placeholder: '请选择设备状态',
      options: [
        {
          value: '正常运行',
          label: '正常运行',
        },
        {
          value: '停机',
          label: '停机',
        },
      ],
    },
  ],
  //设备管理查询表单数据
  searchEquipmentManagementform: {
    deviceName: '',
    deviceType: '',
    deviceStatus: '',
  },

  /* 训练管理 */

  // 训练管理表单
  TrainManagement: [
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'planName',
          label: '训练名称:',
          span: 11,
          placeholder: '请输入训练名称',
          rules: [{ required: true, message: '请输入训练名称', trigger: 'blur' }],
        },
        {
          type: 'select',
          prop: 'planType',
          label: '训练类型:',
          span: 11,
          placeholder: '请选择训练类型',
          options: [
            {
              value: 'H辐射',
              label: 'H辐射',
            },
            {
              value: 'SW污染',
              label: 'SW污染',
            },
            {
              value: 'HX污染',
              label: 'HX污染',
            },
          ],
          rules: [{ required: true, message: '请选择训练类型', trigger: 'change' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'date',
          prop: 'trainingStartTime',
          label: '计划开始时间:',
          span: 11,
          placeholder: '请输入计划开始时间',
          format: 'YYYY-MM-DD',
          valueFormat: 'YYYY-MM-DD',
          rules: [{ required: true, message: '请输入计划开始时间', trigger: 'blur' }],
        },
        {
          type: 'date',
          prop: 'trainingEndTime',
          label: '计划结束时间:',
          span: 11,
          placeholder: '请输入计划结束时间',
          format: 'YYYY-MM-DD',
          valueFormat: 'YYYY-MM-DD',
          rules: [{ required: true, message: '请输入计划结束时间', trigger: 'blur' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'input',
          prop: 'responsiblePerson',
          label: '负责人:',
          span: 11,
          placeholder: '请输入负责人',
          rules: [{ required: true, message: '请输入负责人', trigger: 'blur' }],
        },
        {
          type: 'input',
          prop: 'participantTeams',
          label: '参与团队/人员:',
          span: 11,
          placeholder: '请输入参与团队/人员',
          rules: [{ required: true, message: '请输入参与团队/人员', trigger: 'blur' }],
        },
      ],
    },
    {
      justify: 'space-between',
      columns: [
        {
          type: 'upload',
          prop: 'fileName',
          label: '附件',
          buttonText: '上传附件',
          accept: '*',
          limit: 1,
          span: 11,
          useInputSlot: true,
          rules: [{ required: true, message: '请上传附件', trigger: 'change' }],
        },
      ],
    },
    {
      columns: [
        {
          type: 'textarea',
          prop: 'remarks',
          label: '备注:',
          placeholder: '请输入备注',
          rows: 4,
          rules: [{ max: 200, message: '备注长度不能超过200个字符', trigger: 'blur' }],
        },
      ],
    },
  ],

  // 训练管理表单数据
  TrainManagementdata: {
    planName: '',
    planType: '',
    trainingStartTime: '',
    trainingEndTime: '',
    responsiblePerson: '',
    participantTeams: '',
    fileName: '',
    fileUrl: {},
    remarks: '无',
  },
  // 训练管理查询表单
  searchTrainManagement: [
    {
      type: 'input',
      value: 'planName',
      name: '训练名称',
      placeholder: '请输入内容',
    },
    {
      type: 'select',
      value: 'planType',
      name: '训练类型',
      placeholder: '请选择',
      options: [
        {
          value: 'H辐射',
          label: 'H辐射',
        },
        {
          value: 'SW污染',
          label: 'SW污染',
        },
        {
          value: 'HX污染',
          label: 'HX污染',
        },
      ],
    },
    {
      type: 'times',
      value: 'playTime',
      name: '成立时间',
      placeholder: '请选择时间',
    },
  ],
  //训练管理查询表单数据
  searchTrainManagementform: {
    planName: '',
    planType: '',
    playTime: [],
    trainingStartTime: '',
    trainingEndTime: '',
  },

  /* 救援决策数据管理 */
  //
  RescueManagement: [],
  //
  RescueManagementdata: {
    eventName: '',
    eventType: '',
    hazardousSubstance: '',
    accidentLevel: '',
    receiverPerson: '',
    accidentLocation: '',
    receiveTime: '',
    fileName: '',
    fileUrl: '',
  },
  //
  searchRescueManagement: [],
  //
  searchRescueManagementform: {
    eventName: '',
    eventType: '',
    hazardousSubstance: '',
    accidentLevel: '',
  },
}
